﻿/*******************************************************************************
 * Copyright © 2016
 * 
 * Description: MVC快速开发平台  FROM http://xmwxgn.com
 *
*********************************************************************************/
using ZFine.Application.SystemManage;
using ZFine.Code;
using System.Collections.Generic;
using System.Text;
using System.Web.Mvc;
using ZFine.Application.Project;

namespace ZFine.Web.Controllers
{
    [HandlerLogin]
    public class HomeController : Controller
    {
        private PositionRecordApp positoonapp = new PositionRecordApp();
        //private NewsManagementApp newsapp = new NewsManagementApp();
        //private NotificationNewsApp serverApp = new NotificationNewsApp();
        [HttpGet]
        public ActionResult Index()
        {
            var positionrecord = positoonapp.GetForm(f => f.State == true);
            if (positionrecord != null)
            {
                OperatorProvider.Provider.addPositionrecord(positionrecord.ToJson());
            }
            return View();
        }
        [HttpGet]
        public ActionResult Default()
        {
            //var pagination = new Pagination();
            //pagination.records = 0;
            //pagination.page = 1;
            //pagination.rows = 8;
            //pagination.sidx = "F_CreatorTime desc";
            //pagination.sord = "asc";
            //var result = newsapp.GetListlist(pagination);
            //var resultNoti = serverApp.GetList(pagination,"");
            //if (result != null)
            //{
            //    ViewData["newlist"] = result;
            //}
            //else
            //{
            //    ViewData["newlist"] = null;
            
            //}
            //if (resultNoti != null)
            //{
            //    ViewData["resultNotiList"] = resultNoti;
            //}
            //else
            //{
            //    ViewData["resultNotiList"] = null;
            //}
            return View();
        }
        [HttpGet]
        public ActionResult About()
        {
            return View();
        }

    }
}
